import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login/Login'
import Home from '@/views/home/Home'
import List from '@/views/homechild/List'
import News from '@/views/homechild/News'
import Profile from '@/views/homechild/Profile'
import City from '@/views/fuyong/City'
import Map from '@/views/map/Map.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', component: Login },
  {
    path: '/home',
    component: Home
  },
  { path: '/home/list', component: List },
  { path: '/home/news', component: News },
  { path: '/home/profile', component: Profile },
  { path: '/city', component: City },
  { path: '/map', component: Map }
]

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
